import request from '@/utils/request'

export function getTenant(goodsId) {
  return request({
    url: `/api/goods/tenant?goodsId=${goodsId}`,
    method: 'get'
  })
}

export function putTenant(goodsId,data) {
  return request({
    url: `/api/goods/tenant/${goodsId}?goodsId=${goodsId}`,
    method: 'put',
    data
  })
}

export function listTenant(tenantId,data) {
  return request({
    url: `/api/goods/tenant/list?tenantId=${tenantId}`,
    method: 'post',
    data
  })
}

export function offsaleMaintain(data) {
  return request({
    url: '/api/goods/tenant/maintain/offsale',
    method: 'post',
    data
  })
}

export function onsaleMaintain(data) {
  return request({
    url: '/api/goods/tenant/maintain/onsale',
    method: 'post',
    data
  })
}